package com.lzh.web;

import com.lzh.info.OrderInfo;
import com.lzh.webFeign.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order_api")
public class OrderController {

    @Autowired
    OrderFeignClient orderFeignClient;

    @RequestMapping("addOrder")
    public String addOrder(@RequestBody OrderInfo orderInfo){
        //使用feign
        return orderFeignClient.add(orderInfo);
    }

}
